
package robotinterface;

import javax.swing.*;

/**
 *
 * @author Nate Hemmes
 */
public class OrientationTab extends JComponent{

    public OrientationTab(){

        SpringLayout orientLayout = new SpringLayout();
        setLayout(orientLayout);
        //setBorder(BorderFactory.createEtchedBorder());


        JLabel orientLabel = new JLabel("Orientation");
        add(orientLabel);
        orientLayout.putConstraint(SpringLayout.NORTH, orientLabel, 10, SpringLayout.NORTH, this);
        //orientLayout.putConstraint(SpringLayout.WEST, orientLabel, 270, SpringLayout.WEST, this);
        //orientLayout.putConstraint(SpringLayout.EAST, orientLabel, -50, SpringLayout.EAST, this);
        //orientLayout.putConstraint(SpringLayout.SOUTH, orientLabel, 60, SpringLayout.NORTH, this);
        orientLayout.putConstraint(SpringLayout.HORIZONTAL_CENTER, orientLabel, 0, SpringLayout.HORIZONTAL_CENTER, this);

        GripperPositionPanel gripPosPanel = new GripperPositionPanel();
        add(gripPosPanel);
        orientLayout.putConstraint(SpringLayout.NORTH, gripPosPanel, 29, SpringLayout.SOUTH, orientLabel);
        orientLayout.putConstraint(SpringLayout.WEST, gripPosPanel, 10, SpringLayout.WEST, this);
        orientLayout.putConstraint(SpringLayout.SOUTH, gripPosPanel, 140, SpringLayout.SOUTH, orientLabel);
        orientLayout.putConstraint(SpringLayout.EAST, gripPosPanel, -10, SpringLayout.EAST, this);


        JPanel gripOrientPanel = new GripperOrientPanel();
        add(gripOrientPanel);
        orientLayout.putConstraint(SpringLayout.NORTH, gripOrientPanel, 29, SpringLayout.SOUTH, gripPosPanel);
        orientLayout.putConstraint(SpringLayout.WEST, gripOrientPanel, 10, SpringLayout.WEST, this);
        orientLayout.putConstraint(SpringLayout.SOUTH, gripOrientPanel, 140, SpringLayout.SOUTH, gripPosPanel);
        orientLayout.putConstraint(SpringLayout.EAST, gripOrientPanel, -10, SpringLayout.EAST, this);
    }
}
